home *** CD-ROM | disk | FTP | other *** search
- on setupopen
- global hex, HV, hexA, hexZ
- puppetTempo(24)
- set startnum to the number of cast "OpenHexFX"
- preLoadCast(startnum, startnum + 7)
- set hex to 4
- set HV to 6
- set hexA to the number of cast "hexA"
- set hexZ to the number of cast "hexZ"
- puppetSprite(1, 1)
- repeat with t = HV to HV + 3
- puppetSprite(t, 1)
- end repeat
- openHV()
- openHex()
- end
-
- on openHV
- global HV, hex, screenCentreV, screenCentreH, t, B, L, R, L1, R1, T1, B1, L2, R2, T2, B2
- set screenCentreV to 240
- set screenCentreH to 320
- set t to the top of sprite 1
- set B to the bottom of sprite 1
- set L to the left of sprite 1
- set R to the right of sprite 1
- set the locH of sprite 1 to 320
- set the locV of sprite 1 to 240
- set the height of sprite hex to B - t + 2
- set the width of sprite hex to R - L + 2
- set the locH of sprite hex to screenCentreH
- set the locV of sprite hex to screenCentreV
- if L < 5 then
- set L2 to 15
- else
- set L2 to L
- end if
- set the locH of sprite HV to L2
- if R > 625 then
- set R2 to 625
- else
- set R2 to R
- end if
- set the locH of sprite (HV + 1) to R2
- if t < 20 then
- set T2 to 15
- else
- set T2 to t
- end if
- set the locV of sprite (HV + 2) to T2
- if B > 465 then
- set B2 to 465
- else
- set B2 to B
- end if
- set the locV of sprite (HV + 3) to B2
- updateStage()
- sndEfct()
- end
-
- on closeHV
- global HV, hex, screenCentreV, screenCentreH, t, B, L, R, midV, midH, H1, H2, H3, H4
- set the locH of sprite HV to screenCentreH
- set the locH of sprite (HV + 1) to screenCentreH
- updateStage()
- sndEfct()
- set the locV of sprite (HV + 2) to screenCentreV
- set the locV of sprite (HV + 3) to screenCentreV
- updateStage()
- sndEfct()
- end
-
- on openHex
- global hex, hexA, hexZ
- puppetSprite(hex, 1)
- repeat with x = hexA to hexZ
- set the castNum of sprite hex to x
- updateStage()
- sndEfct()
- end repeat
- end
-
- on closeHex
- global hex, hexA, hexZ
- puppetSprite(hex, 1)
- repeat with x = hexZ down to hexA
- set the castNum of sprite hex to x
- updateStage()
- sndEfct()
- end repeat
- end
-
- on sndEfct
- puppetSound("OpenHexFX")
- updateStage()
- repeat while soundBusy(1)
- nothing()
- end repeat
- end
-